﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;

namespace SharedLib.XmlDataModel
{
    /// <summary>
    /// Enhanced String Dictionary, implementing interface IHasStringKeys
    /// </summary>
    public class StringDictionaryWithKeys : StringDictionary, IHasStringKeys
    {
        /// <summary>
        /// Get key collection
        /// </summary>
        public new ICollection<string> Keys
        {
            get { return base.Keys.Cast<string>().ToList(); }
        }

        /// <summary>
        /// Get value according to key
        /// </summary>
        /// <param name="key">key</param>
        /// <returns>value</returns>
        public string GetValue(string key)
        {
            return this[key];
        }

        public void SetValue(string key, string value)
        {
           this[key] = value;
        }
    }
}
